//2009/08/30 00:58:04
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class LoveCalculator
{
public:
    string findBoy(string girl, vector <string> boys)
    {
		int mmax = -1;
		string s;
        sort(boys.begin(), boys.end());
        for (int i=0; i<boys.size(); i++)
        {
            if(mmax < loveProb(girl, boys[i]))
			{
				mmax = loveProb(girl, boys[i]);
				s = boys[i];
			}
        }
		return s;
    }
    int loveProb(string a, string b)
    {
        string s=a+b;
        int L=0, O=0, V=0, E=0;
        for (int i=0; i<s.size(); i++)
        {
            if (s[i]=='L') L++;
            if (s[i]=='O') O++;
            if (s[i]=='V') V++;
            if (s[i]=='E') E++;
        }
        return ((L+O)*(L+V)*(L+E)*(O+V)*(O+E)*(V+E)) % 100;
    }


};
